<template>
    <el-card>
        <p slot="header">消息详情</p>
        <p v-for="(val, key) in message"><span v-text="key"></span>：<span v-text="val"></span></p>
    </el-card>
</template>
<script>
    import axios from '~plugins/axios';

    export default {
        layout: 'admin',
        head() {
            return {title: '消息详情'};
        },
        data() {
            return {
                metas: []
            };
        },
        asyncData({query}) {
            return axios.get(`/api/message/${query.id}`).then(res => {
                return {message: res.data};
            });
        }
    };
</script>